<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>商品分类</title>
<link rel="stylesheet" href="__PUBLIC__/Mobile/css/page.css">
<script src="__PUBLIC__/Mobile/js/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/Mobile/layer/layer.min.js"></script>
<style>
li{	width:100%;	text-align:center;	background:#fefefe; line-height:40px; background-color:#f2f2f2;	cursor: pointer;border-bottom: 1px solid #e4e4e4;overflow:hidden; border-left:5px solid #f2f2f2;}
.collect{ text-align:center;line-height:40px;color:#43C475; font-size:1.2em; border-bottom:solid 1px #43C475; margin-left:30%;}
</style>

</head>

<body>


<div class="Complete" style="height:50px; line-height:50px; font-size:16px;">
    <a href="javascript:history.back(-1);"><img src="__PUBLIC__/Mobile/images/cls_left1s.png" style="height:20px; line-height:20px;padding-right:2%;"></a>
    <span>全部分类</span>
</div>
<div id="box" >
<ul class="Directory">
<volist name="resone" id="vv" key="k">
    <li class="page"  id="{$vv.id}">{$vv.class_name}</li><!-- class="active" -->
</volist>
</ul>
<div class="div2">
	<ul class="Switching">       
        	<div id="aa"><div style="padding-top:240px; padding-left:160px; font-size:18px;">请选择一级分类</div></div>
    </ul>
</div>
<br style="clear:both" />
</div>


<include file="Public:footer"/>


</body>

<script>
	$(".page").click(function(){
		var pageid =  $(this).attr("id");
		var div_aa = "";
		var div_cc = "";
       $.ajax({
                url: "{:U('Goods/goods_pagelist')}",
                type: "GET",
                data: {pageid:pageid},
                dataType: "json",
                success: function(result){
                	var results=eval('('+result+')');
                	//alert(results['class_name']);
                	 $.each(results,function(i){
                		 //alert(results[i].vo.id);
		               	div_aa += '<a style="margin:0 5px 0 5px;" class="collect" href="{:U('Goods/goods_goodslist')}?class_id='+results[i].id+'">'+results[i].class_name+'</a>';
                	});
                	$('#aa').html(div_aa); 
                }
        });
       $(this).siblings().removeClass("active").end().addClass ("active");
       $('#first').remove();
	});
</script>

</html>
